package com.kma.summer2012.client.events.operator;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.kma.summer2012.shared.model.UICrumbsRequest;

public class EditPageEvent extends GwtEvent<EditPageEvent.EditPageEventHandler> {
    public static GwtEvent.Type<EditPageEventHandler> TYPE = new GwtEvent.Type<EditPageEventHandler>();

    private UICrumbsRequest request;

    public EditPageEvent() {

    }

    public EditPageEvent(UICrumbsRequest req) {
        request = req;

    }

    public interface EditPageEventHandler extends EventHandler {
        void onEditPageEvent(EditPageEvent event, UICrumbsRequest request);

        //   void onShowPage(EditPageEvent event, UICrumbsRequest request);
    }

    @Override
    public Type<EditPageEventHandler> getAssociatedType() {
        return TYPE;
    }


    public static Type<EditPageEventHandler> getType() {
        return TYPE;
    }

    protected void dispatch(EditPageEventHandler handler) {
        handler.onEditPageEvent(this, request);
        //   handler.onShowPage(this,request);

    }


}

